import request from "../utils/request";

/**
 * 注册接口
 */
export const getRegister = (data) => {
  return request({
    url: "api/v1/user/register",
    method: "post",
    data,
  });
};

/**
 * 登录接口
 */
export const getLogin = (data) => {
  return request({
    url: '/api/v1/user/login',
    method: 'post',
    data
  });
};

/**
 * 获取用户信息接口
 */
export const getUserInfo = () => {
  return request({
    url: '/api/v1/user/userInfo',
    method: 'get',
  });
};

/**
 * 课程列表接口
 */
export const getCourseList = (data) => {
  return request({
    url: '/api/v1/course/find',
    method: 'get',
    data
  });
};

/**
 * 课程修改接口
 */
export const updateCourse = (data) => {
  return request({
    url: '/api/v1/course/update',
    method: 'get',
    data
  });
};

/**
 * 课程删除接口
 */
export const deleteCourse = (data) => {
  return request({
    url: '/api/v1/course/delete',
    method: 'get',
    data
  });
};